1. Field of the Invention
The present invention relates to a digital image processing apparatus which can improve gradation by converting the contrast of a video signal of a television camera or monitor.
2. DESCRIPTION OF THE RELATED ART
In an apparatus handling video signals such as a television camera or monitor, visuality of images is promoted by determining a histogram (contrast histogram) and performing contrast conversion (Image Processing Handbook, published by Shoko-do, pp. 263-266). For example, a method has been known which improves the gradation through contrast conversion using a cumulative histogram as shown in FIGS. 1A-1C. In FIG. 1C, curve a represents a histogram distribution of input image data. Curve b represents a cumulative histogram obtained by integrating the histogram of curve a in the direction of brightness level. Curve c represents a histogram after conversion obtained by performing contrast conversion of the input image data through the cumulative histogram. As shown at curve c, by performing the contrast conversion using the cumulative histogram, the histogram after conversion can be distributed uniformly even for an image in which the contrast difference is large. A digital image processing apparatus which is based on this method to improve the gradation is disclosed in, for example, JP-A-61-276071 (hereinafter referred to as prior art 1) and JP-A-63-167983 (hereinafter referred to as prior art 2).
As another prior art, FIG. 2 shows the construction of a digital image processing apparatus disclosed in JP-A-3-177981 (hereinafter referred to as prior art 3). In this apparatus, an image delay unit 81 delays input image data by one vertical scanning period. A cumulative histogram calculator 82 calculates a cumulative histogram of the input image data and applies calculation results to a histogram shape converter 83 constructed of a ROM or RAM. Output signals of the histogram shape converter 83 and image delay unit 81 are inputted to a brightness conversion circuit 84. Essentially, the operation of prior art 3 is similar to that of prior art 1 or 2. However, in prior art 3, the contrast conversion of the input image data is not carried out by using a cumulative histogram and the conversion characteristic is changed in the histogram shape converter 83. Namely, prior: art 3 is applied with a countermeasure against the case where contrast after conversion is excessively strong in prior art 1 or 2.
As described above, in any of prior arts 1 to 3, the contrast conversion is practiced by converting the input image data.
In the above prior arts 1 and 2, however, the contrast is compressed in the extreme at an image portion where the histogram frequency is small, raising a problem that the gradation becomes too small to be recognized easily. More particularly, as shown in FIG. 3, when a portion A of input image data where the histogram frequency is large and a portion B where the histogram frequency is small are subjected to contrast conversion with the digital image processing apparatus of prior art 1 or 2, corresponding portions of output image data become portions Axe2x80x2 and Bxe2x80x2, respectively. As a result, at the output image data portion Bxe2x80x2 corresponding to the portion B where the histogram frequency of the input image data is small, the gradation is deteriorated considerably. In the above prior art 3, this problem can be solved by optimally setting the changed conversion characteristic stored in the ROM or RAM constituting the histogram shape converter 83. However, it is very difficult to optimize the changed conversion characteristic for various types of input image data.
Another problem encountered in the above prior arts 1 to 3 is that the circuit scale becomes large, leading to high costs. Further, in the aforementioned prior arts 1 to 3, output image data subject to contrast conversion is distributed uniformly, but does not have a gamma characteristic of an ordinary video signal which takes the gamma characteristic of the Braun tube into account, raising a problem that as viewed on the Braun tube, a bright portion assumes a large contrast and a dark portion is seen in depressed tone.
The present invention has been made to solve the above problems of the prior arts. An object of the present invention is to provide a digital image processing apparatus which can perform optimum contrast conversion even at an image portion where the histogram frequency is small.
Another object of the present invention is to provide an inexpensive digital image processing apparatus of small circuit scale.
Still another object of the present invention is to provide a digital image processing apparatus which can perform contrast conversion with taking the gamma characteristic of the Braun tube into account.
Still another object of the present invention is to provide a digital image processing apparatus which can reduce fluorescent lamp flicker of input data through contrast conversion.
To accomplish the above objects, a digital image processing apparatus according to the present invention comprises cumulative histogram preparing means for preparing a cumulative histogram from input data, interpolation means for performing contrast conversion of the input data by using the cumulative histogram prepared by the cumulative histogram preparing means, and adder means for adding and averaging an output signal of the interpolation means and the input data at a predetermined ratio.
The digital image processing apparatus according to the present invention further comprises sampling means for sampling the input data discretely and supplying the discretely sampled input data to the cumulative histogram preparing means.
The digital image processing apparatus according to the present invention further comprises gamma correction means interposed between the interpolation means and the adder means for applying gamma correction to the output signal of the interpolation means.
The digital image processing apparatus according to the present invention further comprises latch means interposed between the cumulative histogram preparing means and the interpolation means for holding the cumulative histogram prepared by the cumulative histogram preparing means for one or more vertical scanning periods.
The digital image processing apparatus according to the present invention further comprises image memory means for delaying the input data by one vertical scanning period and supplying the delayed input data to the interpolation means and the adder means.
According to the digital image processing apparatus according to the present invention constructed as above, good gradation can be maintained by adding and averaging an image portion, where the gradation is deteriorated through the contrast conversion and the histogram frequency is small, and the input data of the original image at a predetermined ratio.
Further, in the digital image processing apparatus according to the present invention, the use of the entirety of input data of the image is not required during preparation of the cumulative histogram, so that a circuit of small scale suffices to realize an inexpensive construction.
Further, in the digital image processing apparatus according to the present, invention, the processing for applying the gamma characteristic (gamma correction) is applied after the contrast conversion, so that a natural image display can be realized on the Braun tube.
Furthermore, in the digital image processing apparatus according to the present invention, by subjecting the input data to contrast conversion through the cumulative histogram for three vertical scanning periods by way of illustrative example by means of the latch means, reduction of the influence of fluorescent lamp flicker occurring every three vertical scanning periods can be realized.